from models.meta import BaseDocument, IdField, fields


class KbVuln(BaseDocument):
    obj_id = fields.StringField(unique=True)
    name = fields.DictField()
    key = fields.StringField()
    is_plugin = fields.BooleanField()
    is_deleted = fields.BooleanField(default=False)
    source = fields.StringField()
    vuln_type = fields.ListField()
    severity = fields.IntField()

    meta = {'db_alias': 'kb', 'collection': 'kb_vuln', 'primary_key': 'obj_id'}
